﻿@namespace Microsoft.FluentUI.AspNetCore.Components
@inherits FluentNavMenuItemBase

<CascadingValue TValue=INavMenuItemsOwner Value="@null" IsFixed>
    <FluentTreeItem @ref=TreeItem
                    Id="@Id"
                    Class="@ClassValue"
                    Style="@StyleValue"
                    Disabled="@Disabled"
                    Selected="@Selected"
                    SelectedChanged="@HandleSelectedChangedAsync"
                    Text="@Text">
        @if (HasIcon)
        {
            <FluentIcon Value="@Icon" Width="20px" Slot="start" />
        }
        else if (SiblingHasIcon)
        {
            <span style="width:20px;" slot="start"></span>
        }
        @if (NavMenuExpanded)
        {
            @ChildContent
        }
    </FluentTreeItem>
</CascadingValue>